// Return zemanta object
function prepareZemantaData(apikey, text, title) {
	if (title) {
		return {
			method: 'zemanta.suggest',
			format: 'json',
			api_key: apikey,
			text: text,
			return_rdf_links: 1,
			return_images: 0,
			text_title: title
		};
	}
	else {
		return {
			method: 'zemanta.suggest',
			format: 'json',
			api_key: apikey,
			text: text,
			return_rdf_links: 1,
			return_images: 0,
		};
	}
}

function getZemantaAPI(data, callback) {
	$.ajax({
		url: 'http://api.zemanta.com/services/rest/0.0/',
		type: 'POST',
		data: data,
		success: function (data, type) {
			// Get smth from the json object
			callback(JSON.parse(data));
		}
	});
}

